Home

Operator Usage

Name

++

Description

ket1 ++ ket2
add the values of ket1 and ket2
we do our best to preserve categories
if one ket has a category, and the other doesn't then the result has that category
if ket1 and ket2 have different categories then return the empty ket |>
if ket1 and ket2 are 2D, then add them component-wise


Examples

|3> ++ |5>
    |8>

|number: 3> ++ |5>
    |number: 8>

|number: 3> ++ |page: 5>
    |>

|2: 5> ++ |3: 7>
    |5: 12>


See also

arithmetic, -- , ** , // , %% , ^^

Operator type

infix type 2